package com.study.demoservice.config;

import com.study.demoservice.service.PayService;
import com.study.demoservice.service.impl.PayServiceImpl;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.retry.annotation.EnableRetry;

/**
 * 启用重试，proxyTargetClass = true:CGLIB
 */
@EnableRetry(proxyTargetClass = false)
@Configuration
public class RetryConfig {
    @Bean
    public PayService payService() {
        return new PayServiceImpl();
    }
}
